package com.woniu.springboot.product.blockException;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author zhaolei
 * @date 2021/5/13 - 2:42
 */
public class CustomException {
    public static String error1(BlockException e){
        System.out.println(e.getClass().getCanonicalName());
        return "你点击频率太快，请稍后再试";
    }

    public static String error3(@PathVariable Integer id,BlockException e){
        return "没有此流水" + e.getMessage();
    }
}
